package com.unknowpupil.design.state;

/**
 * @Description: <p>
 *  维持不同钻状态之间的切换
 * </p>
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/4/28 16:07
 * @Classname: Context
 * @Version: 1.0
 */
public class Context {
    // 如果时引号系统，Context类就是账户根据不同过的金额进行切换

    private State state;
    public void setState(State state){
        System.out.println("修改状态");
        state = state;
        state.handle();
    }
}
